﻿using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;

namespace Enterprise.Migrations
{
    public partial class addusertable : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
                name: "USER",
                columns: table => new
                {
                    Id = table.Column<long>(nullable: false)
                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
                    USER_NAME = table.Column<string>(type: "VARCHAR(20)", nullable: false),
                    PASSWORD_HASH = table.Column<string>(type: "VARCHAR(100)", nullable: false),
                    INITIAL_PWD = table.Column<bool>(nullable: false),
                    PHONE_NUMBER = table.Column<string>(type: "VARCHAR(20)", nullable: true),
                    PHONE_NUMBER_CONFIRMED = table.Column<bool>(nullable: true),
                    IsDeleted = table.Column<bool>(nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_USER", x => x.Id);
                });
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "USER");
        }
    }
}
